package fr.umlv.proxir.page;

import java.util.List;

/**
 * interface of what a Page should implements a page is represented by many
 * byte[]
 * 
 * @author gourier & motais
 * 
 */
public interface Page {
	/**
	 * returns the size in bytes of the page
	 * 
	 * @return page size
	 */
	public int getSize();

	/**
	 * adds a byte[] to the current page
	 * 
	 * @param buff
	 *            buffer to add
	 */
	public void addBuffer(byte[] buff);

	/**
	 * returns the page content
	 * 
	 * @return page content
	 */
	public List<byte[]> getContent();

	/**
	 * returns the number of times the page have been requested
	 * 
	 * @return page counter
	 */
	public int getPageCounter();

	/**
	 * sets the number of times the page have been requested
	 * 
	 * @param pageCounter
	 *            the number of visits
	 */
	public void setPageCounter(int pageCounter);

	/**
	 * the String representation of a page
	 * @return String representation
	 */
	public String toString();

	/**
	 * return the value of the Content-type header
	 * @return content type of the page
	 */
	public String getContentType();

	/**
	 * return the value of the Content-encoding header
	 * @return content encoding of the page
	 */
	public String getContentEncoding();

	/**
	 * return the value of the Date header
	 * @return date value of the page
	 */
	public String getDate();

	/**
	 * return the value of the Content-Length header
	 * @return content length of the page
	 */
	public String getContentLength();

	/**
	 * return the value of the Content-Language header
	 * @return content language of the page
	 */
	public String getContentLanguage();

	/**
	 * return the value of the Location header
	 * @return Location of the page
	 */
	public String getLocation();
	/**
	 * return the value of the Forwarded header
	 * @return Forwarded value of the page
	 */
	public String getForwarded();
	/**
	 * return the value of the Expires header
	 * @return Expiration time of the page
	 */
	public String getExpires();
	/**
	 * return the value of the Server header
	 * @return Server of the page
	 */
	public String getServer();
	/**
	 * return the value of the Charset header
	 * @return Charset of the page
	 */
	public String getCharset();
}
